package Statistics;

/**
 * Specifies how the STR attribute will act.
 * @author Hetalar
 * 07/02/2012 
 */
public class Will extends Stat
{	
	private static final String STAT_NAME = "WIL";
	private static final int STAT_ALTER = Statistics.STAT_MP_MAX;
	
	public Will(Statistics stat, int startingValue)
	{
		super(stat, startingValue, STAT_NAME, Statistics.STAT_WIL);
	}
	
	public Will(Statistics stat)
	{
		super(stat, 0, STAT_NAME, Statistics.STAT_WIL);
	}

	protected void applyStat(double oldValue)
	{
		super.applyStat(oldValue);
		double change = oldValue - value;
																					
		if(change != 0)
		{
			this.statistic.increaseStat(STAT_ALTER, 
					Coefficients.calcMaxHPChange(change, statistic));
		}
	}
	
	
}
